<?php /* Template_ 2.2.4 2011/07/07 10:49:20 E:\PHP\www\sagapo\_DATA\template_\skin\default\modify.html 000003163 */ 
$TPL_category_1=empty($TPL_VAR["category"])||!is_array($TPL_VAR["category"])?0:count($TPL_VAR["category"]);?>
<div class="default">
	<script>
		$(function() {
			$('#<?php echo $TPL_VAR["module"]?>_add :radio').checkbox({empty:'<?php echo $TPL_VAR["CFG"]->PATH->CSS?>/images/empty.png'});
			$("#<?php echo $TPL_VAR["module"]?>_add").validate();
			
			$("#<?php echo $TPL_VAR["module"]?>_content").cleditor()[0].focus();
			
<?php if($TPL_VAR["binfo"]->ba_category){?>
			$("#<?php echo $TPL_VAR["module"]?>_category > option[value='<?php echo $TPL_VAR["result"]->bc_seq?>']").attr("selected", "selected");
<?php }?>
		});
	</script>
	
	<form name="<?php echo $TPL_VAR["module"]?>_add" id="<?php echo $TPL_VAR["module"]?>_add" method="post" action="<?php echo $TPL_VAR["action"]?>/doModify">
		<table class="table">
			<caption>
				게시판 추가
			</caption>
			<colgroup>
				<col class="t_add" />
				<col />
			</colgroup>
			<tbody>
<?php if($TPL_VAR["binfo"]->ba_category){?>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_category">카테고리</label></th>
					<td>
						<select name="<?php echo $TPL_VAR["module"]?>_category" id="<?php echo $TPL_VAR["module"]?>_category">
<?php if($TPL_category_1){foreach($TPL_VAR["category"] as $TPL_V1){?>
							<option value="<?php echo $TPL_V1->bc_seq?>"><?php echo $TPL_V1->bc_name?></option>
<?php }}?>
						</select>
						<input type="hidden" name="<?php echo $TPL_VAR["module"]?>_ocategory" value="<?php echo $TPL_VAR["result"]->bc_seq?>" />
					</td>
				</tr>
<?php }?>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_subject">제목</label></th>
					<td>
						<input type="text" name="<?php echo $TPL_VAR["module"]?>_subject" id="<?php echo $TPL_VAR["module"]?>_subject" class="subject required" placeholder="제목" value="<?php echo $TPL_VAR["result"]->b_subject?>" />
						<input type="hidden" name="<?php echo $TPL_VAR["module"]?>_bid" value="<?php echo $TPL_VAR["binfo"]->ba_id?>" />
						<input type="hidden" name="<?php echo $TPL_VAR["module"]?>_seq" value="<?php echo $TPL_VAR["result"]->b_seq?>" />
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_content">내용</label></th>
					<td>
						<textarea id="<?php echo $TPL_VAR["module"]?>_content" name="<?php echo $TPL_VAR["module"]?>_content" class="required" placeholder="내용"><?php echo $TPL_VAR["result"]->b_content?></textarea>
					</td>
				</tr>
<?php if($TPL_VAR["binfo"]->ba_attach){?>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_name">첨부파일</label></th>
					<td>
						첨부파일
					</td>
				</tr>
<?php }?>
			</tbody>
		</table>
		<div class="button_area">
			<button type="submit">전송</button>
			<button type="button" class="cancel" onclick="history.back(-1)">뒤로</button>
		</div>
	</form>
</div>